function mu = TrapezeFuzzySet( x , params )
  
  mu=0;
	
	if ((x>params(1)) && (x<=params(2)))
		mu=(x-params(1))/(params(2)-params(1));
  elseif ((x>params(2)) && (x<=params(3)))
    mu = 1;
  elseif x>params(3) && x<params(4)
		mu=(params(3)-x)/(params(3)-params(2));
	end%if

end

